package faf.dao;

import java.util.Map;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

/**
 * Classe outils qui permet de creer des EntityManager
 * 
 */
public class JpaUtils {
	private EntityManagerFactory _emf;

	public JpaUtils(Map config) {
		_emf = Persistence.createEntityManagerFactory("faf", config);
	}
	
	public JpaUtils() {
		_emf = Persistence.createEntityManagerFactory("faf");
	}
	
	public EntityManager createEntityManger() {
		return _emf.createEntityManager();
	}
	

}
